package com.webproject.service.impl.houseManager;

import java.util.List;


import com.webproject.core.Page;
import com.webproject.dao.houseManager.BuildingManagerDao;
import com.webproject.entity.houseManager.Building;
import com.webproject.service.houseManager.BuildingManagerService;

public class BuildingManagerServiceImpl implements BuildingManagerService{

	private BuildingManagerDao buildingManagerDao;
	public BuildingManagerDao getBuildingManagerDao() {
		return buildingManagerDao;
	}
	public void setBuildingManagerDao(BuildingManagerDao buildingManagerDao) {
		this.buildingManagerDao = buildingManagerDao;
	}
	@Override
	public void queryBuilding(Page page) {
		// TODO Auto-generated method stub
		page.setRows(buildingManagerDao.queryBuilding(page));
		page.setRecords(buildingManagerDao.queryBuildingCount(page));
	}
	@Override
	public void saveBuilding(Building building) {
		// TODO Auto-generated method stub
		buildingManagerDao.saveBuilding(building);
	}

	@Override
	public void updateBuilding(Building building) {
		// TODO Auto-generated method stub
		buildingManagerDao.updateBuilding(building);
	}

	@Override
	public void deleteBuilding(Building building) {
		// TODO Auto-generated method stub
		buildingManagerDao.deleteBuilding(building);
	}
	@Override
	public List<Building> queryBuilding() {
		// TODO Auto-generated method stub
		return buildingManagerDao.queryBuilding();
	}

}
